﻿using Devonline.Entity;
using Devonline.Identity;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Caching.Distributed;
using Microsoft.Extensions.Logging;

namespace Devonline.Communication.Server;

public class IdentityMessageServer : PersistentMessageServer
{
    private readonly IdentityDbContext _identityDbContext;
    public IdentityMessageServer(
        ILogger<IdentityMessageServer> logger,
        IDistributedCache cache,
        IHttpContextAccessor httpContextAccessor,
        HostSetting hostSetting,
        ApplicationDbContext applicationDbContext,
        IdentityDbContext identityDbContext
        ) : base(logger, cache, httpContextAccessor, hostSetting, applicationDbContext)
    {
        _identityDbContext = identityDbContext;
    }

    protected override Task SaveMessageAsync(Message message)
    {
        return base.SaveMessageAsync(message);
    }
}